package com.kfm.wiki.controller;

import com.kfm.wiki.entity.EbookSnapshot;
import com.kfm.wiki.service.EbookService;
import com.kfm.wiki.service.EbookSnapshotService;
import com.kfm.wiki.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/snapshot")
public class EbookSnapshotController {

    @Autowired
    private EbookSnapshotService ebookSnapshotService;


    @GetMapping("/get-info")
    public R get(){
        List<EbookSnapshot> info = ebookSnapshotService.getInfo();
        return R.ok(info);
    }

    @GetMapping("/get-info30")
    public R get30(){
        List<EbookSnapshot> info = ebookSnapshotService.getInfo30();
        return R.ok(info);
    }

}
